package com.tibco.gwt.core.client;

import java.util.ArrayList;
import java.util.List;

import com.tibco.gwt.core.client.ui.ClearableText;
import com.tibco.gwt.core.client.ui.FilmIcon;
import com.tibco.gwt.core.client.ui.ListContainer;
import com.tibco.gwt.core.client.ui.data.FilmStripData;
import com.tibco.gwt.core.shared.FieldVerifier;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Gwtuxcore implements EntryPoint {
	/**
	 * The message displayed to the user when the server cannot be reached or
	 * returns an error.
	 */
	private static final String SERVER_ERROR = "An error occurred while "
			+ "attempting to contact the server. Please check your network "
			+ "connection and try again.";

	/**
	 * Create a remote service proxy to talk to the server-side Greeting
	 * service.
	 */
	private final GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		ClearableText ct = new ClearableText("my");
		RootPanel.get().add(ct);
		ListContainer lc = new ListContainer();
		lc.setSize("200", "200");
		RootPanel.get().add(lc);

		ArrayList list = new ArrayList();
		for (int i = 0; i < 10; i++) {
			FilmStripData fsd = new FilmStripData();
			fsd.setDescription("hello" + i);
			fsd.setImgUrl("gwtuxcore/gwt/standard/images/fish-96x96.gif");
			fsd.setName("Hello name" + i);
			list.add(fsd);
		}
		FilmIcon icon = new FilmIcon(list);
		icon.setHeight("100");
		icon.setWidth("200");

		RootPanel.get().add(icon);
	}
}
